- if recently_releases.size > 0
  .card.mb-3
    .card-header
      h3.card-title
        i.icon.fa-solid.fa-history
        = t('releases.show.last_ten_uploads')
      .card-tools
        button.btn.btn-tool data-lte-toggle="card-collapse"
          i.fa-solid.fa-plus data-lte-icon="expand"
          i.fa-solid.fa-minus data-lte-icon="collapse"
    .card-body.pb-0
      .timeline
        - recently_releases.each do |release|
          ruby:
            is_current = current_release == release
          div
            i.timeline-icon.fa-circle class="#{is_current ? 'fa-solid' : 'fa-regular'}"
            .timeline-item
              span.time data-bs-toggle="tooltip" data-bs-custom-class="default-tooltip" data-bs-title="#{l(release.created_at, format: :nice)}"
                i.icon.fa-solid.fa-clock
                = time_ago_in_words(release.created_at)
              h3.timeline-header
                = link_to release.app_name, friendly_channel_release_path(release.channel, release), class: 'pe-1', data: { turbo_frame: :release, turbo_action: :advance }
                - if release.release_version && release.build_version
                  = t('releases.show.upload_full_version_release', release_version: release.release_version, build_version: release.build_version)
                - elsif release.release_version
                  = t('releases.show.upload_auto_version_release', version: release.release_version)
                - else
                  = t('releases.show.upload_auto_version_release', version: release.version)
              - if release.changelog.present?
                .timeline-body
                  = changelog_render release.text_changelog(head_line: true)
              - if release.release_type.present? || release.branch.present? || release.short_git_commit.present?
                .timeline-footer
                  - if release.device_type
                    small.badge
                      = device_name(release.device_type)
                  - if release.release_type.present?
                    small.badge
                      = release_type_name(release.release_type)
                  - if release.branch.present?
                    small.badge
                      = release.branch
                  - if release.short_git_commit.present?
                    small.badge
                      - if release.channel.git_url.present?
                        = git_commit_url(current_release.channel.git_url, current_release.git_commit)
                      - else
                        = release.short_git_commit
        div
          i.timeline-icon.fa-solid.fa-clock

    - if user_signed_in_or_guest_mode?
      ruby:
        channel_path = friendly_channel_overview_path(current_release.channel)

      .card-footer.d-grid.p-1
        a.btn.w-100.btn-flat.text-primary href="#{channel_path}" data-turbo="false"
          = t('releases.show.view_more')
